package com.market;

import java.util.Formatter;
import java.util.Locale;

import com.market.util.StringUtil;

public class MainClass {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println("".isEmpty());
		
//		System.out.println("春天".length());
//
//		System.out.println("春天到".length());
//		System.out.println("春天百花争艳".length());
//		StringBuilder sBuilder = new StringBuilder();
//		
//		Formatter formatter = new Formatter(sBuilder,Locale.ENGLISH);
//		formatter.format("%-30.30s%s\n", "Tong","|");
//		formatter.format("%30.30s%s\n", "Huang Tong","|");
//		formatter.format("%30.30s%s\n", "We love food, we love chinese Food","|");
//		System.out.println(sBuilder.toString());
		
//		
//		StringUtil util = new StringUtil();
//		util.format("spring",false,40,40);
//		util.newLine(2);
//		util.format("春天spring",false,40,40);
//		util.newLine(1);
//		util.format("春天",false,40,40);
//		util.newLine(1);
//		util.format("春天到",true,40,40);
//		util.newLine(1);
//		util.format("春天百花争艳天",true,40,40);
//		util.newLine(1);
//		util.format("春天百花争艳很好看看了大家都在笑您说好笑不好笑",false,40,40);
//		util.newLine(1);
//		util.format(145.236f,false,2,2);
//		System.out.println(util.toString());	
		
//		StringBuilder sBuilder = new StringBuilder();
//		Formatter formatter = new Formatter(sBuilder);
//		formatter.format("%30.30c\n","spring");
//		formatter.format("%30.30c\n","春天");
//		formatter.format("%30.30c\n","春天到");
//		formatter.format("%30.30c\n","春天百花争艳天");
//		formatter.format("%10c\n","春天百花争艳很好看看了大家都在笑您说好笑不好笑");	
//		System.out.println(sBuilder.toString());
		/*System.out.println(StringUtil.format("Tong", 30, "|"));
		System.out.println(StringUtil.format("Huang Tong", 30, "|"));
		System.out.println(StringUtil.format("春天", 30, "|"));
		System.out.println(StringUtil.format("春天到", 30, "|"));
		System.out.println(StringUtil.format("春天百花争艳", 30, "|"));*/

		// Calendar calendar = Calendar.getInstance();
		// MarketDate marketDate = new MarketDate(calendar);
		// for (int i = 0; i < 5000; i++) {
		// marketDate = marketDate.nextDay();
		// calendar = marketDate.getCalendar();
		// calendar.roll(Calendar.DAY_OF_YEAR, true);

		// System.out.println(calendar.get(Calendar.YEAR) + ":"
		// + calendar.get(Calendar.MONTH) + ":"
		// + calendar.get(Calendar.DATE));
		// }
		// Configuration configuration = new
		// AnnotationConfiguration().configure();
		// configuration.setProperty("hibernate.dialect",
		// "org.hibernate.dialect.MySQL5InnoDBDialect");
		// configuration.setProperty("hibernate.connection.url",
		// "jdbc:mysql://localhost/market?createDatabaseIfNotExist=true&amp;amp;useUnicode=true&amp;amp;characterEncoding=utf-8&amp;amp;autoReconnect=true");
		// configuration.setProperty("hibernate.connection.driver_class",
		// "com.mysql.jdbc.Driver");
		// configuration.setProperty("hibernate.connection.username", "root");
		// configuration.setProperty("hibernate.connection.password", "");
		// SessionFactory sf = configuration.buildSessionFactory();
		// Session session = sf.openSession();
		// Transaction tst = session.beginTransaction();
		// session.save(customer);
		// tst.commit();
		// customDao.setSessionFactory(sf);
		// Customer newCust = customDao.save(customer);
		//
		// System.out.println(newCust.getId());
		//
		// List<User> customers = customDao.getAll();
		// for(User stm:customers){
		// System.out.println(stm.getFirstName());
		// }
	}

}
